package com.apkcore.handlerlib

import org.junit.Test

import org.junit.Assert.*
import java.util.concurrent.LinkedBlockingQueue

/**
 * Example local unit test, which will execute on the development machine (host).
 *
 * See [testing documentation](http://d.android.com/tools/testing).
 */
class ExampleUnitTest {
    @Test
    fun addition_isCorrect() {
        val looper = Looper()

        val handler = Handler(looper, object : Handler.Callback {
            override fun handlerMessage(msg: Message) {
                println("1111111111111111111111")
                println(msg)
            }
        })
        looper.start()

        handler.sendMessage(Message(1, "11111"))
        handler.sendMessage(Message(2, "11111"))
        handler.sendMessage(Message(3, "11111"))
        Thread.sleep(1000)
        looper.quit()
    }
}